﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace ShaboForm
{
    public partial class Workers : Form
    {
        public Workers()
        {
            InitializeComponent();
            this.FormClosing += button1_Click;
        }

        private void Workers_Load(object sender, EventArgs e)
        {
            DataTable dt = DataAccessLayer.GetAllEmployees();
            dataGridView1.DataSource = dt;
            /*dataGridView1.DisplayMemberPath = "FirstName";
            dataGridView1.DisplayMemberPath = "LastName";
            dataGridView1.DisplayMemberPath = "Job";
            dataGridView1.SelectedValuePath = "ID";
        */}

        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.Dispose();
            AdminisrationsForm aForm = new AdminisrationsForm();
            aForm.Show();
        }
    }
}
